{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/builder/css/base.css" media="all" xmlns="http://www.w3.org/1999/html">
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
    .layui-timeline-title{
        margin-bottom: 25px;
    }
</style>

<body>
<div class="layui-fluid layui-anim layui-anim-downbit">
    <div class="layui-card">
        <div class="layui-card-body layui-form" style="padding: 15px;">
            <form action="{:url('examine')}" class="layui-form  v3-admin-form" id="form">
                <input type="hidden" name="id" value="{$info.id}"/>
            <div class="layui-timeline">
                <div class="layui-timeline-item">
                    <i class="layui-icon layui-timeline-axis"></i>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title">订单信息</h3>
                        <div class="layui-form-item">
                            <label class="layui-form-label">订单编号</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.sn}" readonly="">
                            </div>
                            <label class="layui-form-label">下单时间</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.create_time}" readonly="">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">订单状态</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.status}" readonly=""
                                       style="color: red">
                            </div>
                            <label class="layui-form-label">支付方式</label>
                            <div class="layui-input-inline">
                                <input type="text" readonly="" autocomplete="off" class="layui-input"
                                       value="{$info.pay_way}"/>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">支付状态</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.pay_state?'已支付':'未支付'}"
                                       readonly="">
                            </div>
                            <label class="layui-form-label">支付时间</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.pay_time}" placeholder="未支付"
                                       readonly="">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">总金额</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.total_amount}" readonly="">
                            </div>

                            <label class="layui-form-label">实付金额</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.real_amount}" readonly="">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" value="{$info.remark}" readonly=""
                                       style="width: 100%">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">提交审核时间</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.pay_time}" placeholder="未提交"
                                       readonly="">
                            </div>
                        </div>
                        {if $info.refund}
                        <div class="layui-form-item">
                            <label class="layui-form-label">退款理由</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" value="{$info.refund}" readonly=""
                                       style="width: 100%">
                            </div>
                        </div>
                        {/if}
                    </div>
                </div>
                <div class="layui-timeline-item">
                    <i class="layui-icon layui-timeline-axis"></i>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title">下单会员</h3>
                        <div class="layui-form-item">

                            <label class="layui-form-label">会员编号</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.user.code}" readonly="">
                            </div>

                            <label class="layui-form-label">会员昵称</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.user.nickname}" readonly="">
                            </div>

                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">会员手机号</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="{$info.user.mobile}" readonly="">
                            </div>
                        </div>

                    </div>
                </div>

                <div class="layui-timeline-item">
                    <i class="layui-icon layui-timeline-axis"></i>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title">订单商品</h3>
                        <div class="layui-form-item">
                            <label class="layui-form-label">订单商品</label>
                            <div class="layui-input-inline" style="width: 80%;">
                                <table class="layui-table layui-form" style="margin: 0px;">
                                    <thead>
                                    <tr>
                                        <th>商品名称</th>
                                        <th>缩略图</th>
                                        <th>单价</th>
                                        <!--                                <th>规格</th>-->
                                        <th>数量</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach name="$info.productsField" item="v"}
                                    <tr class="data_line">
                                        <td>{$v.title}</td>
                                        <td><a href="{$v.icon}" target="_blank">
                                            <img src="{$v.icon}" style="width: 30px"/>
                                        </a>
                                        </td>
                                        <td>{$v.vip_price}</td>
                                        <!--                                <td>{$v.sku_name}</td>-->
                                        <td>{$v.num}</td>
                                    </tr>
                                    {/foreach}
                                    </tbody>

                                </table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-timeline-item">
                    <i class="layui-icon layui-timeline-axis"></i>
                    <div class="layui-timeline-content layui-text">
                        <h3 class="layui-timeline-title">审核</h3>

                        {if $info->getData('confirm_status') == 1}

                            <div class="layui-form-item">
                                <label class="layui-form-label">审核</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="confirm_status" value="2" title="通过">
                                    <input type="radio" name="confirm_status" value="3" title="驳回">
                                </div>
                            </div>

                        {else}

                            <div class="layui-form-item">
                                <label class="layui-form-label">状态</label>
                                <div class="layui-input-block">
                                    <input type="text"
                                           value="{if $info->getData('confirm_status') == 2}已通过{elseif $info->getData('confirm_status') == 3}已驳回{else}待审核{/if}"
                                           class="layui-input" disabled/>
                                </div>
                            </div>

                        {/if}
                        {if $info->getData('confirm_status') != 2}

                            <div class="layui-form-item">
                                <label class="layui-form-label">驳回原因</label>
                                <div class="layui-input-block">
                                    <input type="text" name="reject_msg" value="{$info.reject_msg?:''}"
                                           placeholder="如要驳回请输入驳回原因"
                                           class="layui-input"/>
                                </div>
                            </div>

                        {/if}
                        {if $info->getData('confirm_status') != 1}

                            <div class="layui-form-item">
                                <label class="layui-form-label">处理时间</label>
                                <div class="layui-input-block">
                                    <input type="text" value="{$info.confirm_time?:''}" class="layui-input" disabled/>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">处理人</label>
                                <div class="layui-input-block">
                                    <input type="text" value="{$info.admin_name?:''}" class="layui-input" disabled/>
                                </div>

                            </div>

                        {/if}
                    </div>

                    </div>
                </div>

            </form>
            </div>
        </div>
    </div>
</div>
{if $info->getData('confirm_status') == 1}
{include file="public/submit" /}
{/if}
</body>
{include file="public/footer" /}
</html>